import TableTemplate, {
  TableTemplateProps,
} from '../utils/class/TableTemplate';
import { defaultsDeep } from 'lodash';

function useTableTemplate<T = any, F = any>(
  title: string,
  attrs: TableTemplateProps = {}
): TableTemplate<T, F> {
  return new TableTemplate<T, F>(defaultsDeep(attrs, { title }));
}

export default useTableTemplate;
